/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.net.entitybean;

/**
 * @Author      :LinhLv
 * @Created     :May 26, 2010
 * @FileName    :C300.java
 * @Package     :queenb.net.entitybean
 * @Purpose     :Data for dashboard
 */
import java.lang.reflect.Field;
import queenb.net.datacontrol.Param;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import oracle.jdbc.OracleTypes;
import queenb.net.annotation.Mapping;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.DataControl;

public class C300 extends DataControl<C300> implements java.io.Serializable {

    @Mapping(name = "fc600", typeMapping = OracleTypes.CHAR)
    private String fc600;
    @Mapping(name = "pc300", typeMapping = OracleTypes.BIGINT)
    public BigDecimal pc300;
    @Mapping(name = "fc200", typeMapping = OracleTypes.BIGINT)
    public BigDecimal fc200;
    @Mapping(name = "fc500", typeMapping = OracleTypes.BIGINT)
    public BigDecimal fc500;
    @Mapping(name = "fn100", typeMapping = OracleTypes.BIGINT)
    public BigDecimal fn100;
    @Mapping(name = "cd301", typeMapping = OracleTypes.DATE)
    public Date cd301;
    @Mapping(name = "cd302", typeMapping = OracleTypes.DATE)
    public Date cd302;
    @Mapping(name = "cd303", typeMapping = OracleTypes.DATE)
    public Date cd303;
    @Mapping(name = "cv304", typeMapping = OracleTypes.CHAR)
    public String cv304;
    @Mapping(name = "cv305", typeMapping = OracleTypes.CHAR)
    public String cv305;
    @Mapping(name = "cv306", typeMapping = OracleTypes.CHAR)
    public String cv306;
    @Mapping(name = "cv307", typeMapping = OracleTypes.CHAR)
    public String cv307;
    @Mapping(name = "cv308", typeMapping = OracleTypes.CHAR)
    public String cv308;
    @Mapping(name = "cn309", typeMapping = OracleTypes.BIGINT)
    public BigDecimal cn309;
    @Mapping(name = "cn310", typeMapping = OracleTypes.BIGINT)
    public BigDecimal cn310;
    @Mapping(name = "cv311", typeMapping = OracleTypes.CHAR)
    public String cv311;
    @Mapping(name = "cv312", typeMapping = OracleTypes.CHAR)
    public String cv312;
    @Mapping(name = "cv313", typeMapping = OracleTypes.CHAR)
    public String cv313;
    @Mapping(name = "cv314", typeMapping = OracleTypes.CHAR)
    public String cv314;
    @Mapping(name = "cn315", typeMapping = OracleTypes.BIGINT)
    public BigDecimal cn315;
    @Mapping(name = "cn316", typeMapping = OracleTypes.BIGINT)
    public BigDecimal cn316;
    @Mapping(name = "cb317", typeMapping = OracleTypes.CLOB)
    public String cb317;
    @Mapping(name = "pic", typeMapping = OracleTypes.INTEGER)
    public int pic;
    @Mapping(name = "doc", typeMapping = OracleTypes.INTEGER)
    public int doc;
    @Mapping(name = "cl346", typeMapping = OracleTypes.CHAR)
    public String cl346;
    @Mapping(name = "cl348", typeMapping = OracleTypes.CHAR)
    public String cl348;
    @Mapping(name = "edte", typeMapping = OracleTypes.INTEGER)
    public int edte;
    @Mapping(name = "dele", typeMapping = OracleTypes.INTEGER)
    public int dele;
    @Mapping(name = "cl347", typeMapping = OracleTypes.CHAR)
    public String cl347;
    @Mapping(name = "cl349", typeMapping = OracleTypes.CHAR)
    public String cl349;
    @Mapping(name = "cv301", typeMapping = OracleTypes.CHAR)
    public String cv301;
    @Mapping(name = "cv302", typeMapping = OracleTypes.CHAR)
    public String cv302;
    @Mapping(name = "HOTEN", typeMapping = OracleTypes.CHAR)
    private String hoten;


    public static void main(String arg[]) throws SQLException, InstantiationException, IllegalAccessException {
        C300 c300 = new C300();

        DataStatement dataStatement = new DataStatement("Ccurpks.ListOfTabC300C", OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.CHAR, "TPV"),
                    new Param(OracleTypes.INTEGER, 300000689),
                    new Param(OracleTypes.CHAR, '0'),
                    new Param(OracleTypes.INTEGER, 1),
                    new Param(OracleTypes.INTEGER, 3),
                    new Param(OracleTypes.INTEGER, 100),});

        List<C300> lstC300 = c300.findBy("TPV",300000689,null,1,3,100);
        System.out.println(lstC300.size());
        for (int i = 0; i < lstC300.size(); i++) {
            C300 c3001 = lstC300.get(i);
            System.out.println("################## " + i + " ######################");
            Field[] fields = c3001.getClass().getDeclaredFields();
            for (int j = 0; j < fields.length; j++) {
                Field field = fields[j];
                System.out.println(field.getName() + ": " + field.get(c3001));
            }

        }
    }

    public List<C300> findBy(String pvLOGIN,
            int pnFC600,
            String pvCV314,
            int pnFIRSTROW,
            int pnROWCOUNT,
            int pnSORT) throws SQLException, InstantiationException, IllegalAccessException {
        DataStatement dataStatement = new DataStatement("Ccurpks.ListOfTabC300C", OracleTypes.CURSOR, new Param[]{
                    new Param(OracleTypes.CHAR, pvLOGIN),
                    new Param(OracleTypes.INTEGER, pnFC600),
                    new Param(OracleTypes.CHAR, pvCV314),
                    new Param(OracleTypes.INTEGER, pnFIRSTROW),
                    new Param(OracleTypes.INTEGER, pnROWCOUNT),
                    new Param(OracleTypes.INTEGER, pnSORT)});
        return super.find(dataStatement, C300.class);
    }

  

    /**
     * @return the pc300
     */
    public BigDecimal getPc300() {
        return pc300;
    }

    /**
     * @param pc300 the pc300 to set
     */
    public void setPc300(BigDecimal pc300) {
        this.pc300 = pc300;
    }

    /**
     * @return the fc200
     */
    public BigDecimal getFc200() {
        return fc200;
    }

    /**
     * @param fc200 the fc200 to set
     */
    public void setFc200(BigDecimal fc200) {
        this.fc200 = fc200;
    }

    /**
     * @return the fc500
     */
    public BigDecimal getFc500() {
        return fc500;
    }

    /**
     * @param fc500 the fc500 to set
     */
    public void setFc500(BigDecimal fc500) {
        this.fc500 = fc500;
    }

    /**
     * @return the fn100
     */
    public BigDecimal getFn100() {
        return fn100;
    }

    /**
     * @param fn100 the fn100 to set
     */
    public void setFn100(BigDecimal fn100) {
        this.fn100 = fn100;
    }

    /**
     * @return the cd301
     */
    public Date getCd301() {
        return cd301;
    }

    /**
     * @param cd301 the cd301 to set
     */
    public void setCd301(Date cd301) {
        this.cd301 = cd301;
    }

    /**
     * @return the cd302
     */
    public Date getCd302() {
        return cd302;
    }

    /**
     * @param cd302 the cd302 to set
     */
    public void setCd302(Date cd302) {
        this.cd302 = cd302;
    }

    /**
     * @return the cd303
     */
    public Date getCd303() {
        return cd303;
    }

    /**
     * @param cd303 the cd303 to set
     */
    public void setCd303(Date cd303) {
        this.cd303 = cd303;
    }

    /**
     * @return the cv304
     */
    public String getCv304() {
        return cv304;
    }

    /**
     * @param cv304 the cv304 to set
     */
    public void setCv304(String cv304) {
        this.cv304 = cv304;
    }

    /**
     * @return the cv305
     */
    public String getCv305() {
        return cv305;
    }

    /**
     * @param cv305 the cv305 to set
     */
    public void setCv305(String cv305) {
        this.cv305 = cv305;
    }

    /**
     * @return the cv306
     */
    public String getCv306() {
        return cv306;
    }

    /**
     * @param cv306 the cv306 to set
     */
    public void setCv306(String cv306) {
        this.cv306 = cv306;
    }

    /**
     * @return the cv307
     */
    public String getCv307() {
        return cv307;
    }

    /**
     * @param cv307 the cv307 to set
     */
    public void setCv307(String cv307) {
        this.cv307 = cv307;
    }

    /**
     * @return the cv308
     */
    public String getCv308() {
        return cv308;
    }

    /**
     * @param cv308 the cv308 to set
     */
    public void setCv308(String cv308) {
        this.cv308 = cv308;
    }

    /**
     * @return the cn309
     */
    public BigDecimal getCn309() {
        return cn309;
    }

    /**
     * @param cn309 the cn309 to set
     */
    public void setCn309(BigDecimal cn309) {
        this.cn309 = cn309;
    }

    /**
     * @return the cn310
     */
    public BigDecimal getCn310() {
        return cn310;
    }

    /**
     * @param cn310 the cn310 to set
     */
    public void setCn310(BigDecimal cn310) {
        this.cn310 = cn310;
    }

    /**
     * @return the cv311
     */
    public String getCv311() {
        return cv311;
    }

    /**
     * @param cv311 the cv311 to set
     */
    public void setCv311(String cv311) {
        this.cv311 = cv311;
    }

    /**
     * @return the cv312
     */
    public String getCv312() {
        return cv312;
    }

    /**
     * @param cv312 the cv312 to set
     */
    public void setCv312(String cv312) {
        this.cv312 = cv312;
    }

    /**
     * @return the cv313
     */
    public String getCv313() {
        return cv313;
    }

    /**
     * @param cv313 the cv313 to set
     */
    public void setCv313(String cv313) {
        this.cv313 = cv313;
    }

    /**
     * @return the cv314
     */
    public String getCv314() {
        return cv314;
    }

    /**
     * @param cv314 the cv314 to set
     */
    public void setCv314(String cv314) {
        this.cv314 = cv314;
    }

    /**
     * @return the cn315
     */
    public BigDecimal getCn315() {
        return cn315;
    }

    /**
     * @param cn315 the cn315 to set
     */
    public void setCn315(BigDecimal cn315) {
        this.cn315 = cn315;
    }

    /**
     * @return the cn316
     */
    public BigDecimal getCn316() {
        return cn316;
    }

    /**
     * @param cn316 the cn316 to set
     */
    public void setCn316(BigDecimal cn316) {
        this.cn316 = cn316;
    }

    /**
     * @return the cb317
     */
    public String getCb317() {
        return cb317;
    }

    /**
     * @param cb317 the cb317 to set
     */
    public void setCb317(String cb317) {
        this.cb317 = cb317;
    }

    /**
     * @return the pic
     */
    public int getPic() {
        return pic;
    }

    /**
     * @param pic the pic to set
     */
    public void setPic(int pic) {
        this.pic = pic;
    }

    /**
     * @return the doc
     */
    public int getDoc() {
        return doc;
    }

    /**
     * @param doc the doc to set
     */
    public void setDoc(int doc) {
        this.doc = doc;
    }

    /**
     * @return the cl346
     */
    public String getCl346() {
        return cl346;
    }

    /**
     * @param cl346 the cl346 to set
     */
    public void setCl346(String cl346) {
        this.cl346 = cl346;
    }

    /**
     * @return the cl348
     */
    public String getCl348() {
        return cl348;
    }

    /**
     * @param cl348 the cl348 to set
     */
    public void setCl348(String cl348) {
        this.cl348 = cl348;
    }

    /**
     * @return the edte
     */
    public int getEdte() {
        return edte;
    }

    /**
     * @param edte the edte to set
     */
    public void setEdte(int edte) {
        this.edte = edte;
    }

    /**
     * @return the dele
     */
    public int getDele() {
        return dele;
    }

    /**
     * @param dele the dele to set
     */
    public void setDele(int dele) {
        this.dele = dele;
    }

    /**
     * @return the cl347
     */
    public String getCl347() {
        return cl347;
    }

    /**
     * @param cl347 the cl347 to set
     */
    public void setCl347(String cl347) {
        this.cl347 = cl347;
    }

    /**
     * @return the cl349
     */
    public String getCl349() {
        return cl349;
    }

    /**
     * @param cl349 the cl349 to set
     */
    public void setCl349(String cl349) {
        this.cl349 = cl349;
    }

    /**
     * @return the cv301
     */
    public String getCv301() {
        return cv301;
    }

    /**
     * @param cv301 the cv301 to set
     */
    public void setCv301(String cv301) {
        this.cv301 = cv301;
    }

    /**
     * @return the cv302
     */
    public String getCv302() {
        return cv302;
    }

    /**
     * @param cv302 the cv302 to set
     */
    public void setCv302(String cv302) {
        this.cv302 = cv302;
    }

    /**
     * @return the hoten
     */
    public String getHoten() {
        return hoten;
    }

    /**
     * @param hoten the hoten to set
     */
    public void setHoten(String hoten) {
        this.hoten = hoten;
    }

    /**
     * @return the fc600
     */
    public String getFc600() {
        return fc600;
    }

    /**
     * @param fc600 the fc600 to set
     */
    public void setFc600(String fc600) {
        this.fc600 = fc600;
    }
}
